﻿#pragma once

#include <QWidget>
#include "ui_SDLRenderRGBWindow.h"
#include "../../common/utils/BinaryFileReader.h"
#include <thread>
#include <QCloseEvent>


class SDLRenderRGBWindow : public QWidget
{
	Q_OBJECT

public:
	SDLRenderRGBWindow(QWidget *parent = nullptr);
	~SDLRenderRGBWindow();
	void RenderVideo();

protected:
	// 重写关闭事件处理函数
	void closeEvent(QCloseEvent* event) override;

public slots:
	void choiceRGB24File();

private:
	Ui::SDLRenderRGBWindow ui;
	std::unique_ptr<std::thread> renderThread;
	int mWidth = 0;
	int mHeight = 0;
	bool isRunning = true;
};
